3.1088 \(\int \frac{1}{(a+i a \tan (e+f x))^3 (c+d \tan (e+f x))} \, dx\)

Optimal. Leaf size=234 \[ \frac{c^2+4 i c d-7 d^2}{8 f (-d+i c)^3 \left (a^3+i a^3 \tan (e+f x)\right )}+\frac{x \left (-6 c^2 d^2+4 i c^3 d+c^4-4 i c d^3-7 d^4\right )}{8 a^3 (c-i d) (c+i d)^4}+\frac{d^4 \log (c \cos (e+f x)+d \sin (e+f x))}{a^3 f (c+i d)^4 (d+i c)}+\frac{-3 d+i c}{8 a f (c+i d)^2 (a+i a \tan (e+f x))^2}-\frac{1}{6 f (-d+i c) (a+i a \tan (e+f x))^3} \]

[Out]

((c^4 + (4*I)*c^3*d - 6*c^2*d^2 - (4*I)*c*d^3 - 7*d^4)*x)/(8*a^3*(c - I*d)*(c + I*d)^4) + (d^4*Log[c*Cos[e + f
*x] + d*Sin[e + f*x]])/(a^3*(c + I*d)^4*(I*c + d)*f) - 1/(6*(I*c - d)*f*(a + I*a*Tan[e + f*x])^3) + (I*c - 3*d
)/(8*a*(c + I*d)^2*f*(a + I*a*Tan[e + f*x])^2) + (c^2 + (4*I)*c*d - 7*d^2)/(8*(I*c - d)^3*f*(a^3 + I*a^3*Tan[e
 + f*x]))

________________________________________________________________________________________

Rubi [A]  time = 0.672629, antiderivative size = 234, normalized size of antiderivative = 1., number of steps used = 5, number of rules used = 4, integrand size = 28, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.143, Rules used = {3559, 3596, 3531, 3530} \[ \frac{c^2+4 i c d-7 d^2}{8 f (-d+i c)^3 \left (a^3+i a^3 \tan (e+f x)\right )}+\frac{x \left (-6 c^2 d^2+4 i c^3 d+c^4-4 i c d^3-7 d^4\right )}{8 a^3 (c-i d) (c+i d)^4}+\frac{d^4 \log (c \cos (e+f x)+d \sin (e+f x))}{a^3 f (c+i d)^4 (d+i c)}+\frac{-3 d+i c}{8 a f (c+i d)^2 (a+i a \tan (e+f x))^2}-\frac{1}{6 f (-d+i c) (a+i a \tan (e+f x))^3} \]

Antiderivative was successfully verified.

[In]

Int[1/((a + I*a*Tan[e + f*x])^3*(c + d*Tan[e + f*x])),x]

[Out]

((c^4 + (4*I)*c^3*d - 6*c^2*d^2 - (4*I)*c*d^3 - 7*d^4)*x)/(8*a^3*(c - I*d)*(c + I*d)^4) + (d^4*Log[c*Cos[e + f
*x] + d*Sin[e + f*x]])/(a^3*(c + I*d)^4*(I*c + d)*f) - 1/(6*(I*c - d)*f*(a + I*a*Tan[e + f*x])^3) + (I*c - 3*d
)/(8*a*(c + I*d)^2*f*(a + I*a*Tan[e + f*x])^2) + (c^2 + (4*I)*c*d - 7*d^2)/(8*(I*c - d)^3*f*(a^3 + I*a^3*Tan[e
 + f*x]))

Rule 3559

Int[((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*tan[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Sim
p[(a*(a + b*Tan[e + f*x])^m*(c + d*Tan[e + f*x])^(n + 1))/(2*f*m*(b*c - a*d)), x] + Dist[1/(2*a*m*(b*c - a*d))
, Int[(a + b*Tan[e + f*x])^(m + 1)*(c + d*Tan[e + f*x])^n*Simp[b*c*m - a*d*(2*m + n + 1) + b*d*(m + n + 1)*Tan
[e + f*x], x], x], x] /; FreeQ[{a, b, c, d, e, f, n}, x] && NeQ[b*c - a*d, 0] && EqQ[a^2 + b^2, 0] && NeQ[c^2
+ d^2, 0] && LtQ[m, 0] && (IntegerQ[m] || IntegersQ[2*m, 2*n])

Rule 3596

Int[((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_)*((A_.) + (B_.)*tan[(e_.) + (f_.)*(x_)])*((c_.) + (d_.)*tan[(e_
.) + (f_.)*(x_)])^(n_), x_Symbol] :> Simp[((a*A + b*B)*(a + b*Tan[e + f*x])^m*(c + d*Tan[e + f*x])^(n + 1))/(2
*f*m*(b*c - a*d)), x] + Dist[1/(2*a*m*(b*c - a*d)), Int[(a + b*Tan[e + f*x])^(m + 1)*(c + d*Tan[e + f*x])^n*Si
mp[A*(b*c*m - a*d*(2*m + n + 1)) + B*(a*c*m - b*d*(n + 1)) + d*(A*b - a*B)*(m + n + 1)*Tan[e + f*x], x], x], x
] /; FreeQ[{a, b, c, d, e, f, A, B, n}, x] && NeQ[b*c - a*d, 0] && EqQ[a^2 + b^2, 0] && LtQ[m, 0] &&  !GtQ[n,
0]

Rule 3531

Int[((c_.) + (d_.)*tan[(e_.) + (f_.)*(x_)])/((a_.) + (b_.)*tan[(e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[((a*c +
 b*d)*x)/(a^2 + b^2), x] + Dist[(b*c - a*d)/(a^2 + b^2), Int[(b - a*Tan[e + f*x])/(a + b*Tan[e + f*x]), x], x]
 /; FreeQ[{a, b, c, d, e, f}, x] && NeQ[b*c - a*d, 0] && NeQ[a^2 + b^2, 0] && NeQ[a*c + b*d, 0]

Rule 3530

Int[((c_) + (d_.)*tan[(e_.) + (f_.)*(x_)])/((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[(c*Log[Re
moveContent[a*Cos[e + f*x] + b*Sin[e + f*x], x]])/(b*f), x] /; FreeQ[{a, b, c, d, e, f}, x] && NeQ[b*c - a*d,
0] && NeQ[a^2 + b^2, 0] && EqQ[a*c + b*d, 0]

Rubi steps

\begin{align*} \int \frac{1}{(a+i a \tan (e+f x))^3 (c+d \tan (e+f x))} \, dx &=-\frac{1}{6 (i c-d) f (a+i a \tan (e+f x))^3}-\frac{\int \frac{-3 a (i c-2 d)-3 i a d \tan (e+f x)}{(a+i a \tan (e+f x))^2 (c+d \tan (e+f x))} \, dx}{6 a^2 (i c-d)}\\ &=-\frac{1}{6 (i c-d) f (a+i a \tan (e+f x))^3}+\frac{i c-3 d}{8 a (c+i d)^2 f (a+i a \tan (e+f x))^2}-\frac{\int \frac{-6 a^2 \left (c^2+3 i c d-4 d^2\right )-6 a^2 (c+3 i d) d \tan (e+f x)}{(a+i a \tan (e+f x)) (c+d \tan (e+f x))} \, dx}{24 a^4 (c+i d)^2}\\ &=-\frac{1}{6 (i c-d) f (a+i a \tan (e+f x))^3}+\frac{i c-3 d}{8 a (c+i d)^2 f (a+i a \tan (e+f x))^2}+\frac{c^2+4 i c d-7 d^2}{8 (i c-d)^3 f \left (a^3+i a^3 \tan (e+f x)\right )}-\frac{\int \frac{6 a^3 \left (i c^3-4 c^2 d-7 i c d^2+8 d^3\right )+6 a^3 d \left (i c^2-4 c d-7 i d^2\right ) \tan (e+f x)}{c+d \tan (e+f x)} \, dx}{48 a^6 (i c-d)^3}\\ &=\frac{\left (c^4+4 i c^3 d-6 c^2 d^2-4 i c d^3-7 d^4\right ) x}{8 a^3 (c-i d) (c+i d)^4}-\frac{1}{6 (i c-d) f (a+i a \tan (e+f x))^3}+\frac{i c-3 d}{8 a (c+i d)^2 f (a+i a \tan (e+f x))^2}+\frac{c^2+4 i c d-7 d^2}{8 (i c-d)^3 f \left (a^3+i a^3 \tan (e+f x)\right )}+\frac{d^4 \int \frac{d-c \tan (e+f x)}{c+d \tan (e+f x)} \, dx}{a^3 (c+i d)^4 (i c+d)}\\ &=\frac{\left (c^4+4 i c^3 d-6 c^2 d^2-4 i c d^3-7 d^4\right ) x}{8 a^3 (c-i d) (c+i d)^4}+\frac{d^4 \log (c \cos (e+f x)+d \sin (e+f x))}{a^3 (c+i d)^4 (i c+d) f}-\frac{1}{6 (i c-d) f (a+i a \tan (e+f x))^3}+\frac{i c-3 d}{8 a (c+i d)^2 f (a+i a \tan (e+f x))^2}+\frac{c^2+4 i c d-7 d^2}{8 (i c-d)^3 f \left (a^3+i a^3 \tan (e+f x)\right )}\\ \end{align*}

Mathematica [A]  time = 1.81287, size = 435, normalized size = 1.86 \[ \frac{\sec ^3(e+f x) \left (42 i c^2 d^2 \sin (e+f x)+72 c^2 d^2 f x \sin (3 (e+f x))-3 \left (-18 c^2 d^2+28 i c^3 d+9 c^4+28 i c d^3-27 d^4\right ) \cos (e+f x)+2 \cos (3 (e+f x)) \left (-36 i c^2 d^2 f x-2 c^3 d (12 f x+i)+c^4 (-1+6 i f x)+24 d^4 \log \left ((c \cos (e+f x)+d \sin (e+f x))^2\right )+2 c d^3 (12 f x-i)+d^4 (1-42 i f x)\right )+36 c^3 d \sin (e+f x)-4 c^3 d \sin (3 (e+f x))-48 i c^3 d f x \sin (3 (e+f x))-9 i c^4 \sin (e+f x)-12 c^4 f x \sin (3 (e+f x))+2 i c^4 \sin (3 (e+f x))+36 c d^3 \sin (e+f x)-4 c d^3 \sin (3 (e+f x))+48 i c d^3 f x \sin (3 (e+f x))+48 i d^4 \sin (3 (e+f x)) \log \left ((c \cos (e+f x)+d \sin (e+f x))^2\right )+51 i d^4 \sin (e+f x)-2 i d^4 \sin (3 (e+f x))+84 d^4 f x \sin (3 (e+f x))\right )}{96 a^3 f (c-i d) (c+i d)^4 (\tan (e+f x)-i)^3} \]

Antiderivative was successfully verified.

[In]

Integrate[1/((a + I*a*Tan[e + f*x])^3*(c + d*Tan[e + f*x])),x]

[Out]

(Sec[e + f*x]^3*(-3*(9*c^4 + (28*I)*c^3*d - 18*c^2*d^2 + (28*I)*c*d^3 - 27*d^4)*Cos[e + f*x] + 2*Cos[3*(e + f*
x)]*((-36*I)*c^2*d^2*f*x + c^4*(-1 + (6*I)*f*x) + d^4*(1 - (42*I)*f*x) + 2*c*d^3*(-I + 12*f*x) - 2*c^3*d*(I +
12*f*x) + 24*d^4*Log[(c*Cos[e + f*x] + d*Sin[e + f*x])^2]) - (9*I)*c^4*Sin[e + f*x] + 36*c^3*d*Sin[e + f*x] +
(42*I)*c^2*d^2*Sin[e + f*x] + 36*c*d^3*Sin[e + f*x] + (51*I)*d^4*Sin[e + f*x] + (2*I)*c^4*Sin[3*(e + f*x)] - 4
*c^3*d*Sin[3*(e + f*x)] - 4*c*d^3*Sin[3*(e + f*x)] - (2*I)*d^4*Sin[3*(e + f*x)] - 12*c^4*f*x*Sin[3*(e + f*x)]
- (48*I)*c^3*d*f*x*Sin[3*(e + f*x)] + 72*c^2*d^2*f*x*Sin[3*(e + f*x)] + (48*I)*c*d^3*f*x*Sin[3*(e + f*x)] + 84
*d^4*f*x*Sin[3*(e + f*x)] + (48*I)*d^4*Log[(c*Cos[e + f*x] + d*Sin[e + f*x])^2]*Sin[3*(e + f*x)]))/(96*a^3*(c
- I*d)*(c + I*d)^4*f*(-I + Tan[e + f*x])^3)

________________________________________________________________________________________

Maple [B]  time = 0.056, size = 564, normalized size = 2.4 \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(1/(a+I*a*tan(f*x+e))^3/(c+d*tan(f*x+e)),x)

[Out]

I/f/a^3*d^4/(I*d-c)/(c+I*d)^4*ln(c+d*tan(f*x+e))+11/16*I/f/a^3/(c+I*d)^4*ln(tan(f*x+e)-I)*c*d^2+5/8/f/a^3/(c+I
*d)^4/(tan(f*x+e)-I)^2*c^2*d-3/8/f/a^3/(c+I*d)^4/(tan(f*x+e)-I)^2*d^3+5/8*I/f/a^3/(c+I*d)^4/(tan(f*x+e)-I)*c^2
*d+1/6*I/f/a^3/(c+I*d)^4/(tan(f*x+e)-I)^3*d^3+5/16/f/a^3/(c+I*d)^4*ln(tan(f*x+e)-I)*c^2*d-15/16/f/a^3/(c+I*d)^
4*ln(tan(f*x+e)-I)*d^3-1/2*I/f/a^3/(c+I*d)^4/(tan(f*x+e)-I)^3*c^2*d-7/8*I/f/a^3/(c+I*d)^4/(tan(f*x+e)-I)*d^3+1
/8/f/a^3/(c+I*d)^4/(tan(f*x+e)-I)*c^3-11/8/f/a^3/(c+I*d)^4/(tan(f*x+e)-I)*c*d^2-1/8*I/f/a^3/(c+I*d)^4/(tan(f*x
+e)-I)^2*c^3+7/8*I/f/a^3/(c+I*d)^4/(tan(f*x+e)-I)^2*c*d^2-1/6/f/a^3/(c+I*d)^4/(tan(f*x+e)-I)^3*c^3+1/2/f/a^3/(
c+I*d)^4/(tan(f*x+e)-I)^3*c*d^2-1/16*I/f/a^3/(c+I*d)^4*ln(tan(f*x+e)-I)*c^3-I/f/a^3/(16*I*d-16*c)*ln(tan(f*x+e
)+I)

________________________________________________________________________________________

Maxima [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: RuntimeError} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(a+I*a*tan(f*x+e))^3/(c+d*tan(f*x+e)),x, algorithm="maxima")

[Out]

Exception raised: RuntimeError

________________________________________________________________________________________

Fricas [A]  time = 1.73996, size = 667, normalized size = 2.85 \begin{align*} \frac{{\left (96 \, d^{4} e^{\left (6 i \, f x + 6 i \, e\right )} \log \left (\frac{{\left (i \, c + d\right )} e^{\left (2 i \, f x + 2 i \, e\right )} + i \, c - d}{i \, c + d}\right ) - 2 \, c^{4} - 4 i \, c^{3} d - 4 i \, c d^{3} + 2 \, d^{4} +{\left (12 i \, c^{4} - 48 \, c^{3} d - 72 i \, c^{2} d^{2} + 48 \, c d^{3} - 180 i \, d^{4}\right )} f x e^{\left (6 i \, f x + 6 i \, e\right )} -{\left (18 \, c^{4} + 60 i \, c^{3} d - 48 \, c^{2} d^{2} + 60 i \, c d^{3} - 66 \, d^{4}\right )} e^{\left (4 i \, f x + 4 i \, e\right )} -{\left (9 \, c^{4} + 24 i \, c^{3} d - 6 \, c^{2} d^{2} + 24 i \, c d^{3} - 15 \, d^{4}\right )} e^{\left (2 i \, f x + 2 i \, e\right )}\right )} e^{\left (-6 i \, f x - 6 i \, e\right )}}{{\left (96 i \, a^{3} c^{5} - 288 \, a^{3} c^{4} d - 192 i \, a^{3} c^{3} d^{2} - 192 \, a^{3} c^{2} d^{3} - 288 i \, a^{3} c d^{4} + 96 \, a^{3} d^{5}\right )} f} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(a+I*a*tan(f*x+e))^3/(c+d*tan(f*x+e)),x, algorithm="fricas")

[Out]

(96*d^4*e^(6*I*f*x + 6*I*e)*log(((I*c + d)*e^(2*I*f*x + 2*I*e) + I*c - d)/(I*c + d)) - 2*c^4 - 4*I*c^3*d - 4*I
*c*d^3 + 2*d^4 + (12*I*c^4 - 48*c^3*d - 72*I*c^2*d^2 + 48*c*d^3 - 180*I*d^4)*f*x*e^(6*I*f*x + 6*I*e) - (18*c^4
 + 60*I*c^3*d - 48*c^2*d^2 + 60*I*c*d^3 - 66*d^4)*e^(4*I*f*x + 4*I*e) - (9*c^4 + 24*I*c^3*d - 6*c^2*d^2 + 24*I
*c*d^3 - 15*d^4)*e^(2*I*f*x + 2*I*e))*e^(-6*I*f*x - 6*I*e)/((96*I*a^3*c^5 - 288*a^3*c^4*d - 192*I*a^3*c^3*d^2
- 192*a^3*c^2*d^3 - 288*I*a^3*c*d^4 + 96*a^3*d^5)*f)

________________________________________________________________________________________

Sympy [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(a+I*a*tan(f*x+e))**3/(c+d*tan(f*x+e)),x)

[Out]

Timed out

________________________________________________________________________________________

Giac [B]  time = 1.50288, size = 603, normalized size = 2.58 \begin{align*} \frac{2 \,{\left (-\frac{i \, d^{5} \log \left (-i \, d \tan \left (f x + e\right ) - i \, c\right )}{2 \, a^{3} c^{5} d + 6 i \, a^{3} c^{4} d^{2} - 4 \, a^{3} c^{3} d^{3} + 4 i \, a^{3} c^{2} d^{4} - 6 \, a^{3} c d^{5} - 2 i \, a^{3} d^{6}} + \frac{{\left (-i \, c^{3} + 5 \, c^{2} d + 11 i \, c d^{2} - 15 \, d^{3}\right )} \log \left (i \, \tan \left (f x + e\right ) + 1\right )}{32 \, a^{3} c^{4} + 128 i \, a^{3} c^{3} d - 192 \, a^{3} c^{2} d^{2} - 128 i \, a^{3} c d^{3} + 32 \, a^{3} d^{4}} + \frac{\log \left (\tan \left (f x + e\right ) + i\right )}{-32 i \, a^{3} c - 32 \, a^{3} d} + \frac{11 i \, c^{3} \tan \left (f x + e\right )^{3} - 55 \, c^{2} d \tan \left (f x + e\right )^{3} - 121 i \, c d^{2} \tan \left (f x + e\right )^{3} + 165 \, d^{3} \tan \left (f x + e\right )^{3} + 45 \, c^{3} \tan \left (f x + e\right )^{2} + 225 i \, c^{2} d \tan \left (f x + e\right )^{2} - 495 \, c d^{2} \tan \left (f x + e\right )^{2} - 579 i \, d^{3} \tan \left (f x + e\right )^{2} - 69 i \, c^{3} \tan \left (f x + e\right ) + 345 \, c^{2} d \tan \left (f x + e\right ) + 711 i \, c d^{2} \tan \left (f x + e\right ) - 699 \, d^{3} \tan \left (f x + e\right ) - 51 \, c^{3} - 223 i \, c^{2} d + 385 \, c d^{2} + 301 i \, d^{3}}{{\left (192 \, a^{3} c^{4} + 768 i \, a^{3} c^{3} d - 1152 \, a^{3} c^{2} d^{2} - 768 i \, a^{3} c d^{3} + 192 \, a^{3} d^{4}\right )}{\left (\tan \left (f x + e\right ) - i\right )}^{3}}\right )}}{f} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(a+I*a*tan(f*x+e))^3/(c+d*tan(f*x+e)),x, algorithm="giac")

[Out]

2*(-I*d^5*log(-I*d*tan(f*x + e) - I*c)/(2*a^3*c^5*d + 6*I*a^3*c^4*d^2 - 4*a^3*c^3*d^3 + 4*I*a^3*c^2*d^4 - 6*a^
3*c*d^5 - 2*I*a^3*d^6) + (-I*c^3 + 5*c^2*d + 11*I*c*d^2 - 15*d^3)*log(I*tan(f*x + e) + 1)/(32*a^3*c^4 + 128*I*
a^3*c^3*d - 192*a^3*c^2*d^2 - 128*I*a^3*c*d^3 + 32*a^3*d^4) + log(tan(f*x + e) + I)/(-32*I*a^3*c - 32*a^3*d) +
 (11*I*c^3*tan(f*x + e)^3 - 55*c^2*d*tan(f*x + e)^3 - 121*I*c*d^2*tan(f*x + e)^3 + 165*d^3*tan(f*x + e)^3 + 45
*c^3*tan(f*x + e)^2 + 225*I*c^2*d*tan(f*x + e)^2 - 495*c*d^2*tan(f*x + e)^2 - 579*I*d^3*tan(f*x + e)^2 - 69*I*
c^3*tan(f*x + e) + 345*c^2*d*tan(f*x + e) + 711*I*c*d^2*tan(f*x + e) - 699*d^3*tan(f*x + e) - 51*c^3 - 223*I*c
^2*d + 385*c*d^2 + 301*I*d^3)/((192*a^3*c^4 + 768*I*a^3*c^3*d - 1152*a^3*c^2*d^2 - 768*I*a^3*c*d^3 + 192*a^3*d
^4)*(tan(f*x + e) - I)^3))/f